<?php
/**
 * Description of StockViewModel
 *
 * @author Mike Gao
 */
class StockViewModel extends ViewModel{
    protected $pk  = 'Stock.id';

    public $viewFields = array(
    	'Stock' => array('id'=>'sid','number','specification'),
        'Product' => array('id'=>'pid', 'name','cas', 'ename','concat(Product.name,"; ",Product.ename)'=>'pname','unit_id','cat_id','cas','minstock','_on' => 'Product.id = Stock.product_id'),
		'Specification' => array('name'=>'specification', '_on' => 'Stock.specification = Specification.id'),

        
    );


}
?>
